


import request from '@/axios';
import { baseUrl } from '@/config/env';

// 商家 商家管理-商家添加
export const AddMerchantCenter = (data) => request({
    url: baseUrl + '/merchantCenter/add',
    method: 'post',
    data
})
// 商家管理-商家列表
export const getMerchantCenterList = (data) => request({
    url: baseUrl + '/merchantCenter/list',
    method: 'post',
    data
});
// 商家管理-商家修改
export const updateMerchantCenter = (data) => request({
    url: baseUrl + '/merchantCenter/update',
    method: 'post',
    data
})
// 商家管理-商家删除
export const deleteMerchantCenter = (id) => request({
    url: baseUrl + `/merchantCenter/delete/${id}`,
    method: 'delete'
});
// 商家管理-获取商家分类
export const selectName = () => request({
    url: baseUrl + `/merchantCenter/selectName`,
    method: 'get'
});
// 商家列表-获取关联用户
export const getRelatedUser = (id) => request({
    url: baseUrl + `/merchantCenter/listStores/getRelatedUser/${id}`,
    method: 'get'
});

// 商家管理-商家入驻-入驻列表
export const getStoreInList = (data) => request({
    url: baseUrl + '/storeIn/storeInList',
    method: 'post',
    data
})
// 商家管理-商家入驻-入驻列表删除
export const deletestoreInList = (id) => request({
    url: baseUrl + `/storeIn/delete/${id}`,
    method: 'delete'
});
// 商家管理-商家入驻-审核
export const updateStatus = (data) => request({
    url: baseUrl + '/storeIn/updateStatus',
    method: 'post',
    data
})


// 商家管理-门店列表-添加门店
export const listStoresAdd = (data) => request({
    url: baseUrl + '/merchantCenter/listStores/add',
    method: 'post',
    data
})
// 商家管理-门店列表-删除门店
export const listStoresDelete = (id) => request({
    url: baseUrl + `/merchantCenter/listStores/delete/${id}`,
    method: 'get'
});
// 商家管理-门店列表-修改门店
export const listStoresUpdate = (data) => request({
    url: baseUrl + '/merchantCenter/listStores/update',
    method: 'post',
    data
})
// 商家管理-门店列表-门店列表
export const listStoresList = (data) => request({
    url: baseUrl + '/merchantCenter/listStores/list',
    method: 'post',
    data
})
// 商家管理-门店列表-门店资质修改
export const listStoresStoreQualifications = (data) => request({
    url: baseUrl + '/merchantCenter/listStores/storeQualifications',
    method: 'post',
    data
})
// 商家管理-门店列表-门店资质查询
export const getStoreQualifications = (id) => request({
    url: baseUrl + `/merchantCenter/listStores/getStoreQualifications/${id}`,
    method: 'get',
})


// 商家管理-店员列表-店员新增
export const addEmployee = (data) => request({
    url: baseUrl + '/merchantCenter/addEmployee',
    method: 'post',
    data
})
// 商家管理-店员列表-店员修改
export const updateEmployee = (data) => request({
    url: baseUrl + '/merchantCenter/stores/update',
    method: 'post',
    data
})
// 商家管理-店员列表-店员列表
export const storeShoperList = (data) => request({
    url: baseUrl + '/merchantCenter/storeShoperList',
    method: 'post',
    data
})
// 商家管理-店员列表-店员删除
export const deleteEmployee = (id) => request({
    url: baseUrl + `/merchantCenter/deleteEmployee/${id}`,
    method: 'get',
})
// 商家管理-店员列表-新增-门店列表
export const selectBelongingStore = (data) => request({
    url: baseUrl + `/merchantCenter/selectBelongingStore`,
    method: 'post',
    data
})


// 商家管理-商家结算-提现申请-列表
export const BalanceApplication = (data) => request({
    url: baseUrl + '/merchantCenter/listStores/BalanceApplication',
    method: 'post',
    data
})
// 商家管理-商家结算-提现申请-余额申请修改状态
export const BalanceApplicationUpdateStatus = (data) => request({
    url: baseUrl + '/merchantCenter/listStores/BalanceApplicationUpdateStatus',
    method: 'post',
    data
})
// 商家管理-商家结算-提现申请-余额申请修改金额
export const BalanceApplicationUpdateCash = (data) => request({
    url: baseUrl + '/merchantCenter/listStores/BalanceApplicationUpdateCash',
    method: 'post',
    data
})
// 商家管理-商家结算-结算列表-结算列表显示
export const SettlementList = (data) => request({
    url: baseUrl + '/merchantCenter/listStores/SettlementList',
    method: 'post',
    data
})